odoo.define('sys.item_disable_open', function (require) {
    "use strict";
    var ViewDialog = require('web.view_dialogs');
    var FormViewDialog = ViewDialog.FormViewDialog;
    FormViewDialog.include({
        open: function () {
            var self = this;
            if(self.options.readonly===true && this.context.disable_open===true)
            {
                return;
            }
            else {
                return this._super();
            }
        },
    });


    //
});